﻿using System;

namespace Teigha.Core
{
	public class OdEdCommandContext_Internal : OdEdCommandContext
	{
		public OdEdCommandContext_Internal(IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
		{
		}

		public override OdEdUserIO userIO()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdEdCommandContext_userIO(OdEdCommandContext.getCPtr(this));
			OdEdUserIO result = new OdEdUserIO_Internal(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdEdFunctionIO funcIO()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdEdCommandContext_funcIO(OdEdCommandContext.getCPtr(this));
			OdEdFunctionIO result = new OdEdFunctionIO_Internal(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdRxObject baseDatabase()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdEdCommandContext_baseDatabase(OdEdCommandContext.getCPtr(this));
			OdRxObject result = new OdRxObject(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void setArbitraryData(string szPathName, OdRxObject pDataObj)
		{
			GlobalsPINVOKE.OdEdCommandContext_setArbitraryData(OdEdCommandContext.getCPtr(this), szPathName, OdRxObject.getCPtr(pDataObj));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override OdRxObject arbitraryData(string szPathName)
		{
			IntPtr cPtr = GlobalsPINVOKE.OdEdCommandContext_arbitraryData(OdEdCommandContext.getCPtr(this), szPathName);
			OdRxObject result = new OdRxObject(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}
	}
}
